

package com.hazelcast.spi.impl.operationservice;

import com.hazelcast.config.SplitBrainProtectionConfig;

/**
 * Marker interface for operations which need to control whether the check
 * for split brain protection will be performed. Internal operations (not triggered by the
 * user) may need to skip the split brain protection check to conserve consistency of data.
 *
 * @see SplitBrainProtectionConfig
 * @see SplitBrainProtectionCheckAwareOperation
 * @see ReadonlyOperation
 */
public interface SplitBrainProtectionCheckAwareOperation {

    /**
     * Returns {@code true} if the split brain protection check should be performed. Operations
     * which require a split brain protection check may get rejected if there are not enough
     * members in the cluster.
     */
    boolean shouldCheckSplitBrainProtection();
}
